package initialize

import (
	"github.com/redis/go-redis/v9"
	"ylm.sl/common/utils"
	"ylm.sl/common/utils/bloomfilter"
)

func initBbloom(rdb *redis.Client) *map[string]*utils.BloomFilter {
	return &map[string]*utils.BloomFilter{
		"userRegisterCachePenetrationBloomFilter": &utils.BloomFilter{
			Name: "userRegisterCachePenetrationBloomFilter",
			Bf:   bloomfilter.NewRedisBloomFilter(rdb, "userRegisterCachePenetrationBloomFilter", 10000, 0.01),
		},
		"gidRegisterCachePenetrationBloomFilter": &utils.BloomFilter{
			Name: "gidRegisterCachePenetrationBloomFilter",
			Bf:   bloomfilter.NewRedisBloomFilter(rdb, "gidRegisterCachePenetrationBloomFilter", 10000, 0.01),
		},
		"shortUriCreateCachePenetrationBloomFilter": &utils.BloomFilter{
			Name: "shortUriCreateCachePenetrationBloomFilter",
			Bf:   bloomfilter.NewRedisBloomFilter(rdb, "shortUriCreateCachePenetrationBloomFilter", 10000, 0.01),
		},
	}
}
